class MyDecorator:
    # 初始化方法，接收被装饰函数
    def __init__(self, func):
        self.func = func

    # 当装饰器实例被调用时执行的方法
    def __call__(self, *args, **kwds):
        print("执行实例方法")
        self.func(*args, **kwds)


@MyDecorator
def hello(a, b, c):
    print("hello", a, b, c)


hello("hu", "lei", "chen")
